﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:System="clr-namespace:System;assembly=mscorlib"
             xmlns:System_Windows_Controls_Primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls"
             xmlns:SL="clr-namespace:Lottery.Client.SL" mc:Ignorable="d"
             x:Class="Lottery.Client.SL.App">

  <Application.Resources>
    <SL:ConvertPriceToBrush x:Key="ConvertPriceToBrush" />
    <!-- //\\TODO:DataCache Imp -->
    <!--<local:DataCache x:Key="DataCache" />-->
    <Style x:Key="buttonStyle0" TargetType="Button">
      <Setter Property="Background" Value="#FF1F3B53" />
      <Setter Property="Foreground" Value="White" />
      <Setter Property="Padding" Value="3" />
      <Setter Property="BorderThickness" Value="1" />
      <Setter Property="BorderBrush">
        <Setter.Value>
          <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFA3AEB9" Offset="0" />
            <GradientStop Color="#FF8399A9" Offset="0.375" />
            <GradientStop Color="#FF718597" Offset="0.375" />
            <GradientStop Color="#FF617584" Offset="1" />
          </LinearGradientBrush>
        </Setter.Value>
      </Setter>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Grid Cursor="Hand">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="mask">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Collapsed</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                      <ColorAnimation Duration="0" To="#FF0D7FA7"
                                      Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"
                                      d:IsOptimized="True" />
                      <ColorAnimation Duration="0" To="#FF59B4D4"
                                      Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="Background"
                                      d:IsOptimized="True" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Pressed">
                    <Storyboard>
                      <ColorAnimation Duration="0" To="#FF6DBDD1"
                                      Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Disabled" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                  <VisualState x:Name="Focused" />
                  <VisualState x:Name="Unfocused" />
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Border x:Name="Background" BorderThickness="{TemplateBinding BorderThickness}"
                      Background="Gray" BorderBrush="#FF404040" />
              <ContentPresenter x:Name="contentPresenter"
                                ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
              <Border x:Name="mask" BorderBrush="#33000000" BorderThickness="1" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="buttonStyle" TargetType="Button">
      <Setter Property="Background" Value="#FF1F3B53" />
      <Setter Property="Foreground" Value="#FF000000" />
      <Setter Property="Padding" Value="3" />
      <Setter Property="BorderThickness" Value="1" />
      <Setter Property="BorderBrush">
        <Setter.Value>
          <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFA3AEB9" Offset="0" />
            <GradientStop Color="#FF8399A9" Offset="0.375" />
            <GradientStop Color="#FF718597" Offset="0.375" />
            <GradientStop Color="#FF617584" Offset="1" />
          </LinearGradientBrush>
        </Setter.Value>
      </Setter>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Grid x:Name="grid" Height="14" HorizontalAlignment="Center" VerticalAlignment="Center"
                  Width="15" Background="#02FFFFFF">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz2"
                                                     Storyboard.TargetProperty="Visibility">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz1"
                                                     Storyboard.TargetProperty="Visibility">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz0"
                                                     Storyboard.TargetProperty="Visibility">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                      </ObjectAnimationUsingKeyFrames>
                      <DoubleAnimation Duration="0" Storyboard.TargetName="X"
                                       Storyboard.TargetProperty="Opacity" To="0.95" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Pressed">
                    <Storyboard>
                      <DoubleAnimation Duration="0" Storyboard.TargetName="X"
                                       Storyboard.TargetProperty="Opacity" To="0.85" />
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz2"
                                                     Storyboard.TargetProperty="Visibility">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz1"
                                                     Storyboard.TargetProperty="Visibility">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz0"
                                                     Storyboard.TargetProperty="Visibility">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Disabled">
                    <Storyboard>
                      <DoubleAnimation Duration="0" Storyboard.TargetName="X"
                                       Storyboard.TargetProperty="Opacity" To="0.5" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Path x:Name="X_Fuzz2" Fill="#14C51900" Stretch="Fill" Stroke="#14C51900" Height="8"
                    HorizontalAlignment="Center" Margin="0,-1,0,0" VerticalAlignment="Center" Width="9" Opacity="1"
                    RenderTransformOrigin="0.5,0.5" Visibility="Collapsed"
                    Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z">
                <Path.RenderTransform>
                  <TransformGroup>
                    <ScaleTransform ScaleX="1.3" ScaleY="1.3" />
                  </TransformGroup>
                </Path.RenderTransform>
              </Path>
              <Path x:Name="X_Fuzz1" Fill="#1EC51900" Stretch="Fill" Stroke="#1EC51900" Height="8"
                    HorizontalAlignment="Center" Margin="0,-1,0,0" VerticalAlignment="Center" Width="9" Opacity="1"
                    RenderTransformOrigin="0.5,0.5" Visibility="Collapsed"
                    Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z">
                <Path.RenderTransform>
                  <TransformGroup>
                    <ScaleTransform ScaleX="1.1" ScaleY="1.1" />
                  </TransformGroup>
                </Path.RenderTransform>
              </Path>
              <Path x:Name="X_Fuzz0" Fill="#FFC51900" Stretch="Fill" Stroke="#FFC51900" Height="8"
                    HorizontalAlignment="Center" Margin="0,-1,0,0" VerticalAlignment="Center" Width="9" Opacity="1" Visibility="Collapsed"
                    Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" />
              <Path x:Name="X" Fill="#FFFFFFFF" Stretch="Fill" Height="8" HorizontalAlignment="Center"
                    Margin="0,-1,0,0" VerticalAlignment="Center" Width="9" Opacity="0.7"
                    Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z">
                <Path.Stroke>
                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF313131" Offset="1" />
                    <GradientStop Color="#FF8E9092" Offset="0" />
                  </LinearGradientBrush>
                </Path.Stroke>
              </Path>
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="ChildWindowStyle_ConfirmWindow" TargetType="controls:ChildWindow">
      <Setter Property="IsTabStop" Value="false" />
      <Setter Property="TabNavigation" Value="Cycle" />
      <Setter Property="HorizontalAlignment" Value="Center" />
      <Setter Property="VerticalAlignment" Value="Center" />
      <Setter Property="HorizontalContentAlignment" Value="Stretch" />
      <Setter Property="VerticalContentAlignment" Value="Stretch" />
      <Setter Property="BorderThickness" Value="1" />
      <Setter Property="BorderBrush">
        <Setter.Value>
          <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFA3AEB9" Offset="0" />
            <GradientStop Color="#FF8399A9" Offset="0.375" />
            <GradientStop Color="#FF718597" Offset="0.375" />
            <GradientStop Color="#FF617584" Offset="1" />
          </LinearGradientBrush>
        </Setter.Value>
      </Setter>
      <Setter Property="OverlayBrush" Value="#7F000000" />
      <Setter Property="OverlayOpacity" Value="1" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="controls:ChildWindow">
            <Grid x:Name="Root">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="WindowStates">
                  <VisualState x:Name="Open">
                    <Storyboard>
                      <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                     Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
                        <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="1.05"
                                              KeySpline="0,0,0.5,1" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1" />
                      </DoubleAnimationUsingKeyFrames>
                      <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                     Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                        <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="1.05"
                                              KeySpline="0,0,0.5,1" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1" />
                      </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Closed">
                    <Storyboard>
                      <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                     Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
                        <SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0" />
                      </DoubleAnimationUsingKeyFrames>
                      <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                     Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                        <SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05" />
                        <SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0" />
                      </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Grid x:Name="Overlay" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Top"
                    Opacity="{TemplateBinding OverlayOpacity}" Background="{TemplateBinding OverlayBrush}" />
              <Grid x:Name="ContentRoot" Height="{TemplateBinding Height}"
                    HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}"
                    Width="{TemplateBinding Width}" RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                  <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform />
                  </TransformGroup>
                </Grid.RenderTransform>
                <Border HorizontalAlignment="Stretch" Margin="-1" VerticalAlignment="Stretch"
                        Background="#14000000" BorderBrush="#14000000" BorderThickness="1" CornerRadius="2" />
                <Border HorizontalAlignment="Stretch" Margin="-2" VerticalAlignment="Stretch"
                        Background="#0F000000" BorderBrush="#0F000000" BorderThickness="1" CornerRadius="2.25" />
                <Border HorizontalAlignment="Stretch" Margin="-3" VerticalAlignment="Stretch"
                        Background="#0C000000" BorderBrush="#0C000000" BorderThickness="1" CornerRadius="2.5" />
                <Border HorizontalAlignment="Stretch" Margin="-4" VerticalAlignment="Stretch"
                        Background="#0A000000" BorderBrush="#0A000000" BorderThickness="1" CornerRadius="2.75" />
                <Border BorderBrush="#FFDADADA" BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="2">
                  <Border Margin="1" Background="Black" BorderBrush="#FFAFAFAF" CornerRadius="1.5">
                    <Grid>
                      <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                      </Grid.RowDefinitions>
                      <Border x:Name="Chrome" Width="Auto" BorderThickness="0,0,0,1">
                        <Grid Height="Auto" Width="Auto">
                          <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="30" />
                          </Grid.ColumnDefinitions>
                          <Grid.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                              <GradientStop Color="#FFCCCCCC" Offset="0" />
                              <GradientStop Color="Black" Offset="1" />
                              <GradientStop Color="#FFABABAB" Offset="0.457" />
                              <GradientStop Color="Black" Offset="0.53" />
                            </LinearGradientBrush>
                          </Grid.Background>
                          <ContentControl FontWeight="Bold" Foreground="White"
                                          IsTabStop="False" HorizontalAlignment="Stretch" Margin="6,0,6,0" VerticalAlignment="Center"
                                          Content="{TemplateBinding Title}" FontSize="14" />
                          <Button x:Name="CloseButton" IsTabStop="False" Height="14"
                                  HorizontalAlignment="Center" Style="{StaticResource buttonStyle}" VerticalAlignment="Center" Width="15" Grid.Column="1" />
                        </Grid>
                      </Border>
                      <Border Margin="5" Grid.Row="1" BorderBrush="#FF6E6E6E" BorderThickness="1">
                        <ContentPresenter x:Name="ContentPresenter"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}" />
                      </Border>
                    </Grid>
                  </Border>
                </Border>
              </Grid>
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="styleRadioButton_BetPlayType" TargetType="RadioButton">
      <Setter Property="Foreground" Value="White" />
      <Setter Property="HorizontalContentAlignment" Value="Center" />
      <Setter Property="VerticalContentAlignment" Value="Center" />
      <Setter Property="BorderThickness" Value="1" />
      <Setter Property="BorderBrush">
        <Setter.Value>
          <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFA3AEB9" Offset="0" />
            <GradientStop Color="#FF8399A9" Offset="0.375" />
            <GradientStop Color="#FF718597" Offset="0.375" />
            <GradientStop Color="#FF617584" Offset="1" />
          </LinearGradientBrush>
        </Setter.Value>
      </Setter>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="RadioButton">
            <Grid x:Name="grid" Cursor="Hand">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver" />
                  <VisualState x:Name="Pressed" />
                  <VisualState x:Name="Disabled">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To=".55"
                                       Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckStates">
                  <VisualState x:Name="Checked">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="(FrameworkElement.Cursor)" Storyboard.TargetName="grid">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Cursor>Arrow</Cursor>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="rectBack">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Collapsed</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="rectMask">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Visible</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Unchecked" />
                  <VisualState x:Name="Indeterminate" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                  <VisualState x:Name="Focused" />
                  <VisualState x:Name="Unfocused" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValidationStates">
                  <VisualState x:Name="Valid" />
                  <VisualState x:Name="InvalidUnfocused" />
                  <VisualState x:Name="InvalidFocused" />
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Rectangle x:Name="rectBack" Grid.ColumnSpan="2" Stroke="Black">
                <Rectangle.Fill>
                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black" Offset="0" />
                    <GradientStop Color="#FF262626" Offset="1" />
                    <GradientStop Color="#FF262626" Offset="0.5" />
                    <GradientStop Color="Black" Offset="0.448" />
                  </LinearGradientBrush>
                </Rectangle.Fill>
              </Rectangle>
              <Rectangle x:Name="rectMask" d:LayoutOverrides="GridBox" Stroke="Gray"
                         Visibility="Collapsed">
                <Rectangle.Fill>
                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFF58400" Offset="0" />
                    <GradientStop Color="#FFF6992D" Offset="1" />
                    <GradientStop Color="#FFF6992D" Offset="0.5" />
                    <GradientStop Color="#FFF58400" Offset="0.448" />
                  </LinearGradientBrush>
                </Rectangle.Fill>
              </Rectangle>
              <ContentPresenter x:Name="contentPresenter"
                                ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
      <Setter Property="Padding" Value="3" />
    </Style>
    <ControlTemplate x:Key="CommonValidationToolTipTemplate" TargetType="ToolTip">
      <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
        <Grid.RenderTransform>
          <TranslateTransform x:Name="Translation" X="-25" />
        </Grid.RenderTransform>
        <VisualStateManager.VisualStateGroups>
          <VisualStateGroup x:Name="OpenStates">
            <VisualStateGroup.Transitions>
              <VisualTransition GeneratedDuration="0" />
              <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                <Storyboard>
                  <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X"
                                   Storyboard.TargetName="Translation">
                    <DoubleAnimation.EasingFunction>
                      <BackEase Amplitude=".3" EasingMode="EaseOut" />
                    </DoubleAnimation.EasingFunction>
                  </DoubleAnimation>
                  <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity"
                                   Storyboard.TargetName="Root" />
                </Storyboard>
              </VisualTransition>
            </VisualStateGroup.Transitions>
            <VisualState x:Name="Closed">
              <Storyboard>
                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity"
                                 Storyboard.TargetName="Root" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="Open">
              <Storyboard>
                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X"
                                 Storyboard.TargetName="Translation" />
                <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity"
                                 Storyboard.TargetName="Root" />
              </Storyboard>
            </VisualState>
          </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Border Background="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4" />
        <Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3" />
        <Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2" />
        <Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1" />
        <Border Background="#FFDC000C" CornerRadius="2">
          <TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap"
                     Text="{Binding (Validation.Errors)[0].ErrorContent}" UseLayoutRounding="false" />
        </Border>
      </Grid>
    </ControlTemplate>
    <Style x:Key="DataGridColumnHeaderStyle_DealStart" TargetType="sdk:DataGridColumnHeader">
      <Setter Property="Foreground" Value="White" />
      <Setter Property="HorizontalContentAlignment" Value="Center" />
      <Setter Property="VerticalContentAlignment" Value="Center" />
      <Setter Property="IsTabStop" Value="False" />
      <Setter Property="SeparatorBrush">
        <Setter.Value>
          <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="Black" Offset="0" />
            <GradientStop Color="#FFCCCCCC" Offset="0.5" />
            <GradientStop Color="Black" Offset="1" />
          </LinearGradientBrush>
        </Setter.Value>
      </Setter>
      <Setter Property="Padding" Value="4" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="sdk:DataGridColumnHeader">
            <Grid x:Name="Root">
              <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
              </Grid.ColumnDefinitions>
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver">
                    <Storyboard>
                      <ColorAnimation Duration="0" To="#7F000000"
                                      Storyboard.TargetProperty="(Fill).(GradientStops)[3].Color" Storyboard.TargetName="BackgroundGradient" />
                      <ColorAnimation Duration="0" To="#CC000000"
                                      Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Storyboard.TargetName="BackgroundGradient" />
                      <ColorAnimation Duration="0" To="#F2000000"
                                      Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Storyboard.TargetName="BackgroundGradient" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Pressed">
                    <Storyboard>
                      <ColorAnimation Duration="0" To="#D8000000"
                                      Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" Storyboard.TargetName="BackgroundGradient" />
                      <ColorAnimation Duration="0" To="#C6000000"
                                      Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Storyboard.TargetName="BackgroundGradient" />
                      <ColorAnimation Duration="0" To="#8C000000"
                                      Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Storyboard.TargetName="BackgroundGradient" />
                      <ColorAnimation Duration="0" To="#3F000000"
                                      Storyboard.TargetProperty="(Fill).(GradientStops)[3].Color" Storyboard.TargetName="BackgroundGradient" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="SortStates">
                  <VisualState x:Name="Unsorted" />
                  <VisualState x:Name="SortAscending">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="SortIcon" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="SortDescending">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="SortIcon" />
                      <DoubleAnimation Duration="0" To="-.9"
                                       Storyboard.TargetProperty="(RenderTransform).ScaleY" Storyboard.TargetName="SortIcon" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Fill="White" Stretch="Fill" />
              <Rectangle x:Name="BackgroundGradient" Grid.ColumnSpan="2" Stretch="Fill">
                <Rectangle.Fill>
                  <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                    <GradientStop Color="#FC000000" Offset="0.015" />
                    <GradientStop Color="#F7000000" Offset="0.375" />
                    <GradientStop Color="#E5000000" Offset="0.6" />
                    <GradientStop Color="#D1000000" Offset="1" />
                  </LinearGradientBrush>
                </Rectangle.Fill>
              </Rectangle>
              <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{TemplateBinding Content}" />
              <Rectangle x:Name="VerticalSeparator" Grid.Column="1"
                         Fill="{TemplateBinding SeparatorBrush}" Visibility="{TemplateBinding SeparatorVisibility}" VerticalAlignment="Stretch"
                         Width="1" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="DataGridCellStyle_Number" TargetType="sdk:DataGridCell">
      <Setter Property="Background" Value="Transparent" />
      <Setter Property="Foreground" Value="White" />
      <Setter Property="HorizontalContentAlignment" Value="Center" />
      <Setter Property="VerticalContentAlignment" Value="Center" />
      <Setter Property="IsTabStop" Value="False" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="sdk:DataGridCell">
            <Grid x:Name="Root" Background="{TemplateBinding Background}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
              </Grid.ColumnDefinitions>
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CurrentStates">
                  <VisualState x:Name="Regular" />
                  <VisualState x:Name="Current">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="FocusVisual" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValidationStates">
                  <VisualState x:Name="Valid" />
                  <VisualState x:Name="Invalid">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="InvalidVisualElement" />
                      <ColorAnimation Duration="0" To="#FFFFFFFF"
                                      Storyboard.TargetProperty="(Fill).Color" Storyboard.TargetName="FocusVisual" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Rectangle x:Name="FocusVisual" Fill="#66FFFFFF" HorizontalAlignment="Stretch"
                         IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" VerticalAlignment="Stretch" />
              <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
                                Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
              <Rectangle x:Name="InvalidVisualElement" HorizontalAlignment="Stretch"
                         IsHitTestVisible="False" Opacity="0" Stroke="#FFDC000C" StrokeThickness="1" VerticalAlignment="Stretch" />
              <Rectangle x:Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
      <Setter Property="Padding" Value="2" />
    </Style>
    <Style x:Key="DataGridRowStyle_Report" TargetType="sdk:DataGridRow">
      <Setter Property="IsTabStop" Value="False" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="sdk:DataGridRow">
            <sdk:DataGridFrozenGrid x:Name="Root">
              <sdk:DataGridFrozenGrid.Resources>
                <Storyboard x:Key="DetailsVisibleTransition">
                  <DoubleAnimation Duration="00:00:0.1" Storyboard.TargetProperty="ContentHeight"
                                   Storyboard.TargetName="DetailsPresenter" />
                </Storyboard>
              </sdk:DataGridFrozenGrid.Resources>
              <sdk:DataGridFrozenGrid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
              </sdk:DataGridFrozenGrid.ColumnDefinitions>
              <sdk:DataGridFrozenGrid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
              </sdk:DataGridFrozenGrid.RowDefinitions>
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="NormalAlternatingRow">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="BackgroundRectangle" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="MouseOver">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="BackgroundRectangle" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="NormalSelected">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="0.5"
                                       Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BackgroundRectangle" d:IsOptimized="True" />
                      <ColorAnimation Duration="0" To="#FF47F3EF"
                                      Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundRectangle"
                                      d:IsOptimized="True" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="MouseOverSelected">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="0.8"
                                       Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BackgroundRectangle" d:IsOptimized="True" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="UnfocusedSelected" />
                  <VisualState x:Name="UnfocusedEditing" />
                  <VisualState x:Name="NormalEditing" />
                  <VisualState x:Name="MouseOverUnfocusedEditing" />
                  <VisualState x:Name="MouseOverEditing" />
                  <VisualState x:Name="MouseOverUnfocusedSelected" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValidationStates">
                  <VisualState x:Name="Valid" />
                  <VisualState x:Name="Invalid">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Duration="0"
                                                     Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BackgroundRectangle">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
                      </ObjectAnimationUsingKeyFrames>
                      <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="InvalidVisualElement" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Fill="Black" Grid.RowSpan="2"
                         Stroke="Black" Opacity="0" />
              <Rectangle x:Name="InvalidVisualElement" Grid.ColumnSpan="2" Fill="Black" Opacity="0"
                         Grid.RowSpan="2" />
              <sdk:DataGridRowHeader x:Name="RowHeader" sdk:DataGridFrozenGrid.IsFrozen="True"
                                     Grid.RowSpan="3" SeparatorBrush="#FF888888" Background="#99000000" />
              <sdk:DataGridCellsPresenter x:Name="CellsPresenter" Grid.Column="1"
                                          sdk:DataGridFrozenGrid.IsFrozen="True" />
              <sdk:DataGridDetailsPresenter x:Name="DetailsPresenter" Grid.Column="1" Grid.Row="1" />
              <Rectangle x:Name="BottomGridLine" Grid.Column="1" HorizontalAlignment="Stretch" Height="1"
                         Grid.Row="2" />
            </sdk:DataGridFrozenGrid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="DataGridCellStyle_Report" TargetType="sdk:DataGridCell">
      <Setter Property="Background" Value="Transparent" />
      <Setter Property="HorizontalContentAlignment" Value="Center" />
      <Setter Property="VerticalContentAlignment" Value="Center" />
      <Setter Property="IsTabStop" Value="False" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="sdk:DataGridCell">
            <Grid x:Name="Root" Background="{TemplateBinding Background}">
              <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
              </Grid.ColumnDefinitions>
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CurrentStates">
                  <VisualState x:Name="Regular" />
                  <VisualState x:Name="Current" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValidationStates">
                  <VisualState x:Name="Valid" />
                  <VisualState x:Name="Invalid">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="InvalidVisualElement" />
                      <ColorAnimation Duration="0" To="#FFFFFFFF"
                                      Storyboard.TargetProperty="(Fill).Color" Storyboard.TargetName="FocusVisual" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="InteractionStates">
                  <VisualState x:Name="Display" />
                  <VisualState x:Name="Editing" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="SelectionStates">
                  <VisualState x:Name="Unselected" />
                  <VisualState x:Name="Selected" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                  <VisualState x:Name="Unfocused" />
                  <VisualState x:Name="Focused" />
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Rectangle x:Name="FocusVisual" Fill="#66000000" HorizontalAlignment="Stretch"
                         IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" VerticalAlignment="Stretch" />
              <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
                                Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
              <Rectangle x:Name="InvalidVisualElement" HorizontalAlignment="Stretch"
                         IsHitTestVisible="False" Opacity="0" Stroke="#FFDC000C" StrokeThickness="1" VerticalAlignment="Stretch" />
              <Rectangle x:Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="DataGridColumnHeaderStyle" TargetType="sdk:DataGridColumnHeader">
      <Setter Property="Foreground" Value="#FF000000" />
      <Setter Property="HorizontalContentAlignment" Value="Left" />
      <Setter Property="VerticalContentAlignment" Value="Center" />
      <Setter Property="IsTabStop" Value="False" />
      <Setter Property="SeparatorBrush" Value="#FFC9CACA" />
      <Setter Property="Padding" Value="4" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="sdk:DataGridColumnHeader">
            <Grid x:Name="Root">
              <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
              </Grid.ColumnDefinitions>
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver" />
                  <VisualState x:Name="Pressed" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="SortStates">
                  <VisualState x:Name="Unsorted" />
                  <VisualState x:Name="SortAscending">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="SortIcon" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="SortDescending">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="SortIcon" />
                      <DoubleAnimation Duration="0" To="-.9"
                                       Storyboard.TargetProperty="(RenderTransform).ScaleY" Storyboard.TargetName="SortIcon" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Stretch="Fill" />
              <Rectangle x:Name="BackgroundGradient" Grid.ColumnSpan="2" Stretch="Fill" />
              <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition />
                  <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <ContentPresenter Content="{TemplateBinding Content}" />
                <Path x:Name="SortIcon" Grid.Column="1"
                      Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z " HorizontalAlignment="Left" Margin="4,0,0,0" Opacity="0"
                      RenderTransformOrigin=".5,.5" Stretch="Uniform" VerticalAlignment="Center" Width="8">
                  <Path.RenderTransform>
                    <ScaleTransform ScaleY=".9" ScaleX=".9" />
                  </Path.RenderTransform>
                </Path>
              </Grid>
              <Rectangle x:Name="VerticalSeparator" Grid.Column="1"
                         Fill="{TemplateBinding SeparatorBrush}" Visibility="{TemplateBinding SeparatorVisibility}" VerticalAlignment="Stretch"
                         Width="1" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="ButtonStyle_Refresh" TargetType="Button">
      <Setter Property="Background" Value="Gray" />
      <Setter Property="Foreground" Value="White" />
      <Setter Property="Padding" Value="3" />
      <Setter Property="BorderThickness" Value="1" />
      <Setter Property="BorderBrush" Value="#FF404040" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Grid Cursor="Hand">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="mask">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Collapsed</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverBackground">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Visible</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Collapsed</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Pressed" />
                  <VisualState x:Name="Disabled" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                  <VisualState x:Name="Focused" />
                  <VisualState x:Name="Unfocused" />
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Border x:Name="Background" BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="3" />
              <Border x:Name="MouseOverBackground" BorderThickness="{TemplateBinding BorderThickness}"
                      Background="#FF0D7FA7" BorderBrush="#FF59B4D4" CornerRadius="3" Visibility="Collapsed" />
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.Clip>
                  <RectangleGeometry Rect="0,0,16,16" />
                </Grid.Clip>
                <Image Source="/SL_Lottery_EEGClient;component/Images/clb-icons.png" Stretch="None"
                       Margin="-64,-80,0,0" />
              </Grid>
              <Border x:Name="mask" BorderBrush="#33000000" BorderThickness="1" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
      <Setter Property="Width" Value="22" />
      <Setter Property="Height" Value="22" />
    </Style>
    <Style x:Key="ButtonStyle_Search" TargetType="Button">
      <Setter Property="Background" Value="Gray" />
      <Setter Property="Foreground" Value="White" />
      <Setter Property="Padding" Value="3" />
      <Setter Property="BorderThickness" Value="1" />
      <Setter Property="BorderBrush" Value="#FF404040" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Grid Cursor="Hand">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="mask">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Collapsed</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverBackground">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Visible</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Collapsed</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Pressed" />
                  <VisualState x:Name="Disabled" />
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                  <VisualState x:Name="Focused" />
                  <VisualState x:Name="Unfocused" />
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Border x:Name="Background" BorderThickness="{TemplateBinding BorderThickness}"
                      Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="3" />
              <Border x:Name="MouseOverBackground" BorderThickness="{TemplateBinding BorderThickness}"
                      Background="#FF0D7FA7" BorderBrush="#FF59B4D4" CornerRadius="3" Visibility="Collapsed" />
              <Grid Margin="{TemplateBinding Padding}">
                <Grid.Clip>
                  <RectangleGeometry Rect="0,0,16,16" />
                </Grid.Clip>
                <Image Source="/SL_Lottery_EEGClient;component/Images/clb-icons.png" Stretch="None"
                       Margin="-160,-112,0,0" />
              </Grid>
              <Border x:Name="mask" BorderBrush="#33000000" BorderThickness="1" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
      <Setter Property="Width" Value="22" />
      <Setter Property="Height" Value="22" />
    </Style>
    <Style x:Key="DatePickerTextBoxStyle_Normal" TargetType="System_Windows_Controls_Primitives:DatePickerTextBox">
      <Setter Property="VerticalContentAlignment" Value="Center" />
      <Setter Property="HorizontalContentAlignment" Value="Left" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="System_Windows_Controls_Primitives:DatePickerTextBox">
            <Grid x:Name="Root">
              <Grid.Resources>
                <SolidColorBrush x:Key="WatermarkBrush" Color="#FFAAAAAA" />
              </Grid.Resources>
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0" />
                    <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                  </VisualStateGroup.Transitions>
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver">
                    <Storyboard>
                      <ColorAnimationUsingKeyFrames
Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="ContentElement">
                        <SplineColorKeyFrame KeyTime="0" Value="#FF99C1E2" />
                      </ColorAnimationUsingKeyFrames>
                      <ColorAnimationUsingKeyFrames
Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="ContentElement2">
                        <SplineColorKeyFrame KeyTime="0" Value="#FF99C1E2" />
                      </ColorAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="WatermarkStates">
                  <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0" />
                  </VisualStateGroup.Transitions>
                  <VisualState x:Name="Unwatermarked" />
                  <VisualState x:Name="Watermarked">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="ContentElement" />
                      <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="Watermark" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStates">
                  <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0" />
                  </VisualStateGroup.Transitions>
                  <VisualState x:Name="Unfocused" />
                  <VisualState x:Name="Focused">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="FocusVisual" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Opacity="1">
                <Grid x:Name="WatermarkContent" Background="{TemplateBinding Background}">
                  <Border x:Name="ContentElement" BorderBrush="#FFFF1414" BorderThickness="1"
                          Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" />
                  <Border x:Name="ContentElement2" BorderBrush="#FF333333" BorderThickness="1">
                    <ContentControl x:Name="Watermark" Background="{TemplateBinding Background}"
                                    Content="{TemplateBinding Watermark}" Foreground="{StaticResource WatermarkBrush}"
                                    FontSize="{TemplateBinding FontSize}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" IsTabStop="False"
                                    Opacity="0" Padding="2" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
                  </Border>
                  <Border x:Name="FocusVisual" BorderBrush="Black"
                          BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" IsHitTestVisible="False" Opacity="0" />
                </Grid>
              </Border>
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    <Style x:Key="DatePickerStyle_Normal" TargetType="sdk:DatePicker">
      <Setter Property="IsTabStop" Value="False" />
      <Setter Property="Background" Value="#FF333333" />
      <Setter Property="Padding" Value="2" />
      <Setter Property="SelectionBackground" Value="#FF444444" />
      <Setter Property="BorderBrush" Value="Black" />
      <Setter Property="BorderThickness" Value="1" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="sdk:DatePicker">
            <Grid x:Name="Root">
              <Grid.Resources>
                <SolidColorBrush x:Key="DisabledBrush" Color="#8CFFFFFF" />
                <ControlTemplate x:Key="DropDownButtonTemplate" TargetType="Button">
                  <Grid FlowDirection="LeftToRight">
                    <VisualStateManager.VisualStateGroups>
                      <VisualStateGroup x:Name="CommonStates">
                        <VisualStateGroup.Transitions>
                          <VisualTransition GeneratedDuration="0" />
                          <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                          <VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                        </VisualStateGroup.Transitions>
                        <VisualState x:Name="Normal" />
                        <VisualState x:Name="MouseOver">
                          <Storyboard>
                            <ColorAnimation Duration="0" To="#FF448DCA"
                                            Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background" />
                            <ColorAnimationUsingKeyFrames BeginTime="0"
                                                          Duration="00:00:00.001"
                                                          Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
                                                          Storyboard.TargetName="BackgroundGradient">
                              <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
                            </ColorAnimationUsingKeyFrames>
                            <ColorAnimationUsingKeyFrames BeginTime="0"
                                                          Duration="00:00:00.001"
                                                          Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
                                                          Storyboard.TargetName="BackgroundGradient">
                              <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
                            </ColorAnimationUsingKeyFrames>
                            <ColorAnimationUsingKeyFrames BeginTime="0"
                                                          Duration="00:00:00.001"
                                                          Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                                          Storyboard.TargetName="BackgroundGradient">
                              <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
                            </ColorAnimationUsingKeyFrames>
                          </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Pressed">
                          <Storyboard>
                            <ColorAnimationUsingKeyFrames BeginTime="0"
                                                          Duration="00:00:00.001" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
                                                          Storyboard.TargetName="Background">
                              <SplineColorKeyFrame KeyTime="0" Value="#FF448DCA" />
                            </ColorAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                           Duration="00:00:00.001" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight">
                              <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                            <ColorAnimationUsingKeyFrames BeginTime="0"
                                                          Duration="00:00:00.001"
                                                          Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
                                                          Storyboard.TargetName="BackgroundGradient">
                              <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
                            </ColorAnimationUsingKeyFrames>
                            <ColorAnimationUsingKeyFrames BeginTime="0"
                                                          Duration="00:00:00.001"
                                                          Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
                                                          Storyboard.TargetName="BackgroundGradient">
                              <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
                            </ColorAnimationUsingKeyFrames>
                            <ColorAnimationUsingKeyFrames BeginTime="0"
                                                          Duration="00:00:00.001"
                                                          Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
                                                          Storyboard.TargetName="BackgroundGradient">
                              <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
                            </ColorAnimationUsingKeyFrames>
                            <ColorAnimationUsingKeyFrames BeginTime="0"
                                                          Duration="00:00:00.001"
                                                          Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
                                                          Storyboard.TargetName="BackgroundGradient">
                              <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
                            </ColorAnimationUsingKeyFrames>
                          </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Disabled">
                          <Storyboard>
                            <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                           Duration="00:00:00.001" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisual">
                              <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                            </DoubleAnimationUsingKeyFrames>
                          </Storyboard>
                        </VisualState>
                      </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Grid Background="#11FFFFFF" HorizontalAlignment="Center" Height="18"
                          Margin="0" VerticalAlignment="Center" Width="19">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="20*" />
                        <ColumnDefinition Width="20*" />
                        <ColumnDefinition Width="20*" />
                        <ColumnDefinition Width="20*" />
                      </Grid.ColumnDefinitions>
                      <Grid.RowDefinitions>
                        <RowDefinition Height="23*" />
                        <RowDefinition Height="19*" />
                        <RowDefinition Height="19*" />
                        <RowDefinition Height="19*" />
                      </Grid.RowDefinitions>
                      <Border x:Name="Highlight" BorderBrush="#FF6DBDD1" BorderThickness="1"
                              Grid.ColumnSpan="4" CornerRadius="0,0,1,1" Margin="-1" Opacity="0" Grid.Row="0" Grid.RowSpan="4" />
                      <Border x:Name="Background" BorderBrush="#FFFFFFFF" BorderThickness="1"
                              Background="#FF1F3B53" Grid.ColumnSpan="4" CornerRadius=".5" Margin="0,-1,0,0" Opacity="1" Grid.Row="1"
                              Grid.RowSpan="3" />
                      <Border x:Name="BackgroundGradient" BorderBrush="#BF000000"
                              BorderThickness="1" Grid.ColumnSpan="4" CornerRadius=".5" Margin="0,-1,0,0" Opacity="1" Grid.Row="1" Grid.RowSpan="3">
                        <Border.Background>
                          <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                            <GradientStop Color="#FFFFFFFF" Offset="0" />
                            <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                            <GradientStop Color="#E5FFFFFF" Offset="0.625" />
                            <GradientStop Color="#C6FFFFFF" Offset="1" />
                          </LinearGradientBrush>
                        </Border.Background>
                      </Border>
                      <Rectangle Grid.ColumnSpan="4" Grid.RowSpan="1" StrokeThickness="1">
                        <Rectangle.Fill>
                          <LinearGradientBrush EndPoint="0.3,-1.1" StartPoint="0.46,1.6">
                            <GradientStop Color="#FF4084BD" />
                            <GradientStop Color="#FFAFCFEA" Offset="1" />
                          </LinearGradientBrush>
                        </Rectangle.Fill>
                        <Rectangle.Stroke>
                          <LinearGradientBrush EndPoint="0.48,-1" StartPoint="0.48,1.25">
                            <GradientStop Color="#FF494949" />
                            <GradientStop Color="#FF9F9F9F" Offset="1" />
                          </LinearGradientBrush>
                        </Rectangle.Stroke>
                      </Rectangle>
                      <Path Grid.ColumnSpan="4" Grid.Column="0"
                            Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z"
                            Fill="#FF2F2F2F" HorizontalAlignment="Center" Margin="4,3,4,3" Grid.Row="1" Grid.RowSpan="3"
                            RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center" />
                      <Ellipse Grid.ColumnSpan="4" Fill="#FFFFFFFF" HorizontalAlignment="Center"
                               Height="3" StrokeThickness="0" VerticalAlignment="Center" Width="3" />
                      <Border x:Name="DisabledVisual" BorderBrush="#B2FFFFFF" BorderThickness="1"
                              Grid.ColumnSpan="4" CornerRadius="0,0,.5,.5" Opacity="0" Grid.Row="0" Grid.RowSpan="4" />
                    </Grid>
                  </Grid>
                </ControlTemplate>
              </Grid.Resources>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
              </Grid.ColumnDefinitions>
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="Disabled">
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="DisabledVisual" />
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="ValidationStates">
                  <VisualState x:Name="Valid" />
                  <VisualState x:Name="InvalidUnfocused">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                     Storyboard.TargetName="ValidationErrorElement">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Visible</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="InvalidFocused">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                     Storyboard.TargetName="ValidationErrorElement">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <Visibility>Visible</Visibility>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen"
                                                     Storyboard.TargetName="validationTooltip">
                        <DiscreteObjectKeyFrame KeyTime="0">
                          <DiscreteObjectKeyFrame.Value>
                            <System:Boolean>True</System:Boolean>
                          </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <System_Windows_Controls_Primitives:DatePickerTextBox x:Name="TextBox"
                                                                    BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
                                                                    Background="{TemplateBinding Background}" Grid.Column="0" Padding="{TemplateBinding Padding}"
                                                                    SelectionBackground="{TemplateBinding SelectionBackground}" Style="{StaticResource DatePickerTextBoxStyle_Normal}"
                                                                    IsReadOnly="True" />
              <Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="1"
                      Grid.Column="0" CornerRadius="1" Visibility="Collapsed">
                <ToolTipService.ToolTip>
                  <ToolTip x:Name="validationTooltip"
                           DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right"
                           PlacementTarget="{Binding ElementName=TextBox}" Template="{StaticResource CommonValidationToolTipTemplate}">
                    <ToolTip.Triggers>
                      <EventTrigger RoutedEvent="Canvas.Loaded">
                        <BeginStoryboard>
                          <Storyboard>
                            <ObjectAnimationUsingKeyFrames
Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
                              <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                  <System:Boolean>true</System:Boolean>
                                </DiscreteObjectKeyFrame.Value>
                              </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                          </Storyboard>
                        </BeginStoryboard>
                      </EventTrigger>
                    </ToolTip.Triggers>
                  </ToolTip>
                </ToolTipService.ToolTip>
                <Grid Background="Transparent" HorizontalAlignment="Right" Height="12"
                      Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
                  <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C" Margin="1,3,0,0" />
                  <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#FFFFFF" Margin="1,3,0,0" />
                </Grid>
              </Border>
              <Button x:Name="Button" BorderBrush="{TemplateBinding BorderBrush}"
                      BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" Foreground="{TemplateBinding Foreground}"
                      Margin="2,0,2,0" Template="{StaticResource DropDownButtonTemplate}" Width="20" />
              <Grid x:Name="DisabledVisual" Grid.ColumnSpan="2" IsHitTestVisible="False" Opacity="0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*" />
                  <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Rectangle Fill="#8CFFFFFF" RadiusY="1" RadiusX="1" />
                <Rectangle Grid.Column="1" Fill="#8CFFFFFF" Height="18" Margin="2,0,2,0" RadiusY="1"
                           RadiusX="1" Width="19" />
              </Grid>
              <Popup x:Name="Popup" />
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
  </Application.Resources>
</Application>